using System.Collections.Generic;
using System;
using NHibernate.Expression;

namespace CosyTrade.Distribution
{
    public interface IClientManager
    {
        void AddClientCategory(ClientCategoryBase clientCategory);
        void UpdateClientCategory(ClientCategoryBase clientCategory,bool isParentChanged);
        void DeleteClientCategory(Guid deleteKey);

        IList<ClientCategoryBase> GetClientCategoryRoot();
        ClientCategory GetClientCategoryDetail(Guid primaryKey);
        IList<ClientCategoryBase> GetClientCategoryByCriterion(ICriterion criterion);

        void CreateNewClient(ClientBase clientBase);
        void UpdateClient(ClientBase clientBase , IList<AddressEditModule> editModules);
        void DeleteClient(Guid deleteKey);

        IList<ClientBase> GetClientInfoList(ICriterion criterion, int pageIndex, int pageSize, params NHibernate.Expression.Order[] orders);
        Client GetClientInfoDetail(Guid primaryKey);
        ClientBase GetClientBaseByCode(ICriterion criterion);

        IList<ClientBase> GetAllClientInfo();
        int GetClientCount(ICriterion criterion);

        Guid[] GetClientKeys(RegionBase regionBase);
        Guid[] GetClientKeys(string keyWord);

    }
}